package YAPserver.behaviours;

import YAPserver.gameObjects.AbstractBall;
import YAPserver.gameObjects.GameBall;
import YAPserver.gameObjects.Mod;
import YAPserver.logic.Output;
import YAPserver.logic.Player;
import YAPserver.score.CountingAward;

/**
 * This class tells the player how to respond when there is a collision typically between a slider and a ballAbstract.
 * @author Daniel
 *
 */
public class CollideSlider implements CollideBehaviour{

	@Override
	public void collide(Player player, AbstractBall ball, Output out) {
		if(ball instanceof Mod){
			((Mod) ball).activate(player);
			//for the shopper award
			player.score(CountingAward.Shopping);
			return;
		}
		if(ball instanceof GameBall){
			//for the bunny award
			player.score(CountingAward.Bunny);
			return;
		}
	}

}
